package lj.fx.tool;

import cn.hutool.core.util.ClassLoaderUtil;
import javafx.fxml.FXMLLoader;

import java.io.IOException;

/**
 * @author: liuwenju
 * @date: 2023/6/26 8:46
 * @version: 1.0
 */
public class ToolFxml {

    /**
     * 通过 fxml 构建场景
     *
     * @param path
     * @return
     */
    public static FXMLLoader load(String path) {
        return new FXMLLoader(ClassLoaderUtil.getClassLoader().getResource(path));
    }
}
